package com.zgr.newhospital.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * @Author: 郑国荣
 * @Date: 2023-07-20-0:01
 * @Description:
 */
@Data
@Repository
@NoArgsConstructor
@AllArgsConstructor
public class User {
    @TableId(value = "uid",type = IdType.ASSIGN_ID)
    private Long uid;
    private String uname;
    private String upwd;
    private Integer age;
    private String email;

    @TableField(fill = FieldFill.INSERT) //添加数据是填充当前时间戳
    private Date createTime; //create_time

    @TableField(fill = FieldFill.INSERT_UPDATE) //修改数据是填充当前时间戳
    private Date updateTime; //update_time

    @Version
    @TableField(fill = FieldFill.INSERT) //添加数据是填充当前时间戳
    private Integer version;

    @TableLogic
    private Integer deleted;
}
